package top.lixunda.ecommerce.server.good.api.entity.db;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 'commerce_goods.order_detail' is not BASE TABLE
 * </p>
 *
 * @author Xumda
 * @since 2020-01-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("order_review")
@ApiModel(value="OrderReviewDO对象", description="'commerce_goods.order_detail' is not BASE TABLE")
public class OrderReviewDO extends Model<OrderReviewDO> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "唯一id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "用户名称")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "店铺id")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "店铺名称")
    @TableField("store_name")
    private String storeName;

    @ApiModelProperty(value = "订单id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "描述评分，总分10分，五颗星")
    @TableField("grade_desc")
    private Integer gradeDesc;

    @ApiModelProperty(value = "物流评分，总分10分，五颗星")
    @TableField("grade_logis")
    private Integer gradeLogis;

    @ApiModelProperty(value = "服务评分，总分10分，五颗星")
    @TableField("grade_service")
    private Integer gradeService;

    @ApiModelProperty(value = "评价")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "是否匿名，默认0，不匿名，0 不匿名 1 匿名")
    @TableField("anonymous_enable")
    private Integer anonymousEnable;

    @ApiModelProperty(value = "评论创建时间，即发表评论时间")
    @TableField("time")
    private LocalDateTime time;

    @ApiModelProperty(value = "逻辑删除")
    @TableField("useable")
    @TableLogic
    @JsonIgnore
    private Integer useable;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
